// ----------------------------------
// RSDK Project: Sonic 1/Sonic 2
// Script Description: Lava Splash Object
// Script Author: Christan Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

//-------Aliases-------//
private alias 62 : TYPE_LAVASPLASH


// Static Values

// Tables

event ObjectMain
	switch object.state
	case 0
		object.frame = object.animationTimer
		object.frame /= 3
		object.animationTimer++
		if object.animationTimer == 6
			object.animationTimer = 0
			object.value0++
			if object.value0 == 6
				object.value0 = 0
				object.state++
			end if
		end if
		break
	case 1
		object.frame = object.animationTimer
		object.frame /= 3
		object.frame += 2
		object.animationTimer++
		if object.animationTimer == 6
			object.animationTimer = 0
			object.value0++
			if object.value0 == 2
				object.type = TypeName[Blank Object]
			end if
		end if
		break
	end switch
end event


event ObjectDraw
	DrawSprite(object.frame)
end event


event ObjectStartup
	LoadSpriteSheet("MZ/Objects.gif")
	SpriteFrame(-56, -18, 112, 30, 288, 332)
	SpriteFrame(-55, -18, 110, 30, 401, 332)
	SpriteFrame(-24, -18, 48, 30, 268, 1)
	SpriteFrame(-23, -18, 46, 30, 270, 32)
end event

event RSDKDraw
	DrawSprite(0)
end event

event RSDKLoad
	LoadSpriteSheet("Global/Display.gif")
	SpriteFrame(-16, -16, 32, 32, 1, 143)
end event
